// 封装组织架构部门所有接口
import request from '@/utils/request'

/**
 * 新增部门
 * @param {mobile,password} data
 */
export function addDepartment(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

/**
 * 查询企业的部门列表
 * @param
 */
export function getDepartments() {
  return request({
    url: '/company/department'
  })
}
/**
 * 根据ID修改部门详情
 * @param
 */
export function updateDepartments(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}
/**
 * 根据ID删除部门
 * @param
 */
export function delDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
/**
 * 根据ID查询部门详情
 * @param
 */
export function getDepartmentDetia(id) {
  return request({
    url: `/company/department/${id}`
  })
}

